package com.example.sunran.service.impl;

import com.example.sunran.bean.User;
import com.example.sunran.service.LoginService;

public class LoginServiceImpl implements LoginService {
    @Override
    public User login(String user, String pwd) {

        //假设一个用户bean
        User  userBean = new User();
        userBean.setUser("sunran");
        userBean.setPwd("sunran");
        userBean.setAvatar("http://p3.music.126.net/SUotlxd5AQknfYT9CxjPpA==/109951163711948939.jpg?param=200y200");

        if (user.equals(userBean.getUser()) && pwd.equals(userBean.getPwd())) {
            return userBean;
        }else{
            return new User();
        }
    }
}
